str1 = input("请输入：")
count4 = count3 = count2 = count1 = 0
for i in str1:
    if i >= "A" and i <= "Z":
        count1 += 1
    if i >= "a" and i <= "z":
        count2 += 1
    if i >= "0" and i <= "9":
        count3 += 1
count4 = len(str1) - count1 - count2 - count3
print("字符串中大写字母", count1, "个，小写字母", count2, "个，数字", count3, "个，其他字符", count4, "个")
